#ifndef _SPI_SLAVE_H
#define _SPI_SLAVE_H
#include <avr/io.h>
#include <avr/interrupt.h>

#define SPI_PORT		PORTB
#define SPI_PIN			PINB
#define SPI_DDR			DDRB

#define SS_PIN			2
#define	MOSI_PIN		3
#define MISO_PIN		4		
#define SCK_PIN			5

#define BUFFER_SIZE 33						     //in bytes (2..254), change ONLY here!!!!!

extern volatile uint8_t rxBuffer[BUFFER_SIZE];
extern volatile uint8_t txBuffer[BUFFER_SIZE];
volatile uint8_t bufferAddr; 					

extern void spiSlaveInit(void);

#endif //_SPI_SLAVE_H